From: Jan Beulich Date: Tue, 15 Jan 2013 15:11:04 +0000 (+0100) Subject: fix XENMEM_remove_from_physmap return value X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~7433 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=77d3a1db3196b1b5864469f8d3f41d496800c795;p=xen.git fix XENMEM_remove_from_physmap return value A random value is being returned as of c/s 26350:ba386fd2bf17 in the success case. Signed-off-by: Jan Beulich Acked-by: Ian Campbell Acked-by: Daniel De Graaf --- diff --git a/xen/common/memory.c b/xen/common/memory.c index fe79ca003e..6b4ef73647 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -687,10 +687,11 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg) if ( d == NULL ) return -ESRCH; - if ( xsm_remove_from_physmap(XSM_TARGET, current->domain, d) ) + rc = xsm_remove_from_physmap(XSM_TARGET, current->domain, d); + if ( rc ) { rcu_unlock_domain(d); - return -EPERM; + return rc; } domain_lock(d);